package com.xf.common.core.domain;

/**
 * @author
 * @description
 * @date 2019-08-06
 **/
public class Constants {
    //用户登录状态
    public static final String USER_LOGIN_PREFIX = "sys:user_login";
    //白名单配置
    public static final String WHITE_LIST = "sys:white_list";
    //用户权限菜单
    public static final String USER_MENU = "sys:user_menu";

    //用户登录超时时间
    public static final long USER_TIME_OUT = 30 * 60L;
    /**
     * 客户端有效时间
     */
    public static final long CLIENT_DETAILS = 12 * 60 * 60L;
    /**
     * 客户端名称
     */
    public static final String CACHE_CLIENT_KEY = "sys:client_details";
    //AES加解密key、iv失效时间
    public static final long AES_TIME_OUT = 24 * 60 * 60L;

    //验证码前缀
    public static final String VERIFYCODE_PREFIX = "sys:VerifyCode:";
    //验证码过期时间
    public static final long VERIFYCODE_TIME_OUT = 15 * 60L;
    //验证发送间隔时间
    public static final long VERIFYCODE_INTERVAL_TIME = 60L;
    //验证码次数前缀
    public static final String VERIFYCODE_COUNT_PREFIX = "sys:VerifyCodeTimes:";
    //验证码单日发送次数限制
    //TODO 方便测试人员 暂将短信发送次数由每日3次改为15次
    public static final int VERIFYCODE_LIMIT = 15;

    //运维组id
    public static final long GM_GROUP_ID = 0L;
    //普通用户管理员默认组id
    public static final long MANAGER_DEFAULT_GROUP_ID = 1L;
    //普通用户默认组id
    public static final long NORMAL_DEFAULT_GROUP_ID = 2L;

    //租户最大用户数量
    public static final int TENANT_DEFAULT_MAX_USER_NUMS = 3;

    //用户默认密码
    public static final String DEFAULT_PASSWORD = "xm123456";

    //运维端
    public static final String GM = "gm";
    //用户PC端、手机端
    public static final String PCORPHONE = "pcOrPhone";

    /**
     * 最大请求一万条
     */
    public static final int ES_MAX_COUNT = 10000;

    /**
     * 请求头类型：
     * application/x-www-form-urlencoded ： form表单格式
     * application/json ： json格式
     */
    public static final String REQUEST_HEADERS_CONTENT_TYPE = "application/json";

    /**
     * 请求头类型：
     * application/x-www-form-urlencoded ： form表单格式
     * application/json ： json格式
     */
    public static final String REQUEST_HEADERS_FORM_CONTENT_TYPE = "application/x-www-form-urlencoded";

    /**
     * 请求头 - token
     */
    public static final String REQUEST_HEADER = "X-Token";

    public static final int HASH_ITERATIONS = 1;

    public static String SALT = "abc!@#$%^Dmp";

}
